<html>
<head><meta charset="utf-8"><title>Backtraces for assertions in LLVM · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html">Backtraces for assertions in LLVM</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223920478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223920478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223920478">(Jan 25 2021 at 16:17)</a>:</h4>
<p>Hey, all. What's the trick to getting stack backtraces for assertion failures that occur inside LLVM? I'm trying to debug changes I made to the llvm version used by rustc.</p>



<a name="223920600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223920600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223920600">(Jan 25 2021 at 16:18)</a>:</h4>
<p><span class="user-mention" data-user-id="380247">@Michael Coblenz</span> I think there's a <code>llvm-assertions</code> option in config.toml</p>



<a name="223920676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223920676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223920676">(Jan 25 2021 at 16:18)</a>:</h4>
<p>Related: how do I make x.py rebuild llvm-project? I tried ./x.py build src/llvm  but that didn't rebuild until I nuked build/&lt;platform&gt;/llvm.</p>



<a name="223920762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223920762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223920762">(Jan 25 2021 at 16:19)</a>:</h4>
<p>I have assertions = true in [llvm]. Maybe that'll work after I get the rebuild working.</p>



<a name="223920934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223920934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223920934">(Jan 25 2021 at 16:20)</a>:</h4>
<p>try removing <code>build/$TARGET/llvm/llvm-finished-building</code></p>



<a name="223921630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223921630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223921630">(Jan 25 2021 at 16:24)</a>:</h4>
<p>aha, ok. Will that result in an incremental llvm build when I run x.py?</p>



<a name="223921688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223921688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223921688">(Jan 25 2021 at 16:25)</a>:</h4>
<p>I would expect it to, not 100% sure</p>



<a name="223923300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223923300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223923300">(Jan 25 2021 at 16:33)</a>:</h4>
<p>ok, I'll give it a try. Thanks.</p>



<a name="223923690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223923690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223923690">(Jan 25 2021 at 16:36)</a>:</h4>
<p>Nope, I'm still not getting backtraces from inside llvm.</p>



<a name="223923800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223923800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223923800">(Jan 25 2021 at 16:36)</a>:</h4>
<p>not sure then, sorry</p>



<a name="223924702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223924702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223924702">(Jan 25 2021 at 16:43)</a>:</h4>
<p>ok. thanks anyway!</p>



<a name="223940060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223940060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Coblenz <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223940060">(Jan 25 2021 at 18:30)</a>:</h4>
<p>It seems that removing llvm-finished-building does not cause a rebuild to happen when I run <code>x.py build src/llvm </code>.</p>



<a name="223940460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223940460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223940460">(Jan 25 2021 at 18:34)</a>:</h4>
<p>can you see it attempt a new <code>cmake</code> run, at least?</p>



<a name="223940546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223940546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223940546">(Jan 25 2021 at 18:34)</a>:</h4>
<p>but new flags don't always trigger a new build, if the cmake files are underspecified</p>



<a name="223940611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Backtraces%20for%20assertions%20in%20LLVM/near/223940611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Backtraces.20for.20assertions.20in.20LLVM.html#223940611">(Jan 25 2021 at 18:34)</a>:</h4>
<p>(which would be an LLVM build issue, not Rust per se)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>